package com.xdjd.task.mapper.activity;

import com.xdjd.task.model.activity.ActivityUserClockPo;
import net.oschina.durcframework.easymybatis.dao.CrudDao;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface ActivityUserClockPoDao extends CrudDao<ActivityUserClockPo> {
    @Update("update activity_user_clock set status=2 where status=1 and remain_day=0")
    int endClock();

    @Update("update activity_user_clock set remain_day=remain_day-1 where clock_no=#{clockNo} and remain_day>0")
    int reduceRemainDay(@Param("clockNo") String clockNo);
}